package com.recharge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.recharge.common.result.ResultDO;
import com.recharge.core.entity.GoodsProviderEntity;
import com.recharge.domain.query.GoodsProviderQueryDO;
import com.recharge.domain.vo.GoodsProviderDO;

/**
 * <p>
 * 商品与供应商关联 服务类
 * </p>
 *
 * @author reagan
 * @since 2020-08-19
 */
public interface GoodsProviderService extends IService<GoodsProviderEntity> {

    /**
     * 批量添加商品关联供货商
     * @param param
     * @return
     */
    public ResultDO addBatch(GoodsProviderDO param);
    /**
     * 返回商品供货商关联
     * @param id
     * @return ResultDO
     */
    public ResultDO get(String id);

    public ResultDO edit(GoodsProviderDO domain);

    public ResultDO remove(String providerId, String goodsId, String modifier);

    public ResultDO removeBatch(String providerId, String goodsIds, String modifier);

    public ResultDO removeByGoodsId(String goodId, String modifier);

    public ResultDO find(GoodsProviderQueryDO domain);
    /**
     *  供货商品管理分页
     * @param query
     * @return
     */
    public ResultDO otherPage(GoodsProviderQueryDO query);

    /**
     * 根据商品ID查询供货列表
     * @param goodsId
     * @return
     */
    public ResultDO list(String goodsId);

    public ResultDO listByProviderId(String providerId);


    /**
     * 根据商品ID查询供应通道
     * @param goodsId
     * @return
     */
    public ResultDO getProviderGoodsId(String goodsId);

    /**
     * 根据供货商ID删除供货关联
     * @param providerId
     * @param modifier
     * @return
     */
    public ResultDO removeByProviderId(String providerId, String modifier);

    /**
     *  批量修改成本折扣
     * @param providerId
     * @param priority
     * @return
     */
    public ResultDO updateCostDiscountBatch(String groupId, String providerId, Float costDiscount, Integer priority, String modifier);
    /**
     * 商品组修改状态
     * @param providerId
     * @param goodsIds
     * @param status
     * @param modifier
     * @return
     */
    public ResultDO updateStatus(String providerId, String goodsIds, Integer status, String modifier);
    /**
     * 商品组修改状态
     * @param providerId
     * @param status
     * @param modifier
     * @return
     */
    public ResultDO updateStatus(String providerId, Integer status, String modifier);

}
